Proof support for generic type classes

نویسندگان

  • Ron van Kesteren
  • Marko C. J. D. van Eekelen
  • Maarten de Mol
چکیده

We present a proof rule and an effective tactic for proving properties about HASKELL type classes by proving them for the available instance definitions. This is not straightforward, because instance definitions may depend on each other. The proof assistant ISABELLE handles this problem for single parameter type classes by structural induction on types. However, this does not suffice for an effective tactic for more complex forms of overloading. We solve this using an induction scheme derived from the instance definitions. The tactic based on this rule is implemented in the proof assistant SPARKLE.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Generic Programming and Proving for Programming Language Metatheory

We present a system for both the generic programming of operations that work over classes of tree-structured data types and the automatic generation of formal type-theoretical proofs about such operations. The system is implemented in the Coq proof assistant, using dependent types to validate code and proof generation statically, quantified over all possible input data types. We focus on generi...

متن کامل

Featherweight Generic Ownership

Object ownership is an approach to controlling aliasing in programming languages. Proposals for adding ownership to programming languages do not directly support type genericity. We present Featherweight Generic Ownership — the first system to unify ownership and type polymorphism. Our type system extends Featherweight Generic Java with locations to support ownership and confinement invariants,...

متن کامل

Instant Generics: Fast and Easy

This paper introduces a novel approach to datatype-generic programming based on type classes and type families. The approach favours simplicity as generic functions are based on Haskell’s standard construct for ad-hoc polymorphism, namely type classes — hence, it integrates well with existing classes and facilitates overriding of generic behaviour with conventional class instances. Moreover, ou...

متن کامل

Groups with one conjugacy class of non-normal subgroups‎ - ‎a short proof

For a finite group $G$ let $nu(G)$ denote the number of conjugacy classes of non-normal subgroups of $G$. We give a short proof of a theorem of Brandl, which classifies finite groups with $nu(G)=1$.

متن کامل

Genus: Making Generics Object-Oriented, Expressive, and Lightweight Technical Report

The support for generic programming in modern object-oriented programming languages is awkward and lacks desirable expressive power. We introduce an expressive genericity mechanism that adds expressive power and strengthens static checking, while remaining lightweight and simple in common use cases. Like type classes and concepts, the mechanism allows existing types to model type constraints re...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004